package com.projectX.buzzatpickup;

import lombok.Data;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Switch;
import android.widget.ToggleButton;

public @Data
class VibrateActivity extends Activity {

	private static final String TAG = VibrateActivity.class.getCanonicalName();

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_vibrate);
	}

	public void onToggleClicked(View view) {
		// Is the toggle on?
		boolean on = ((Switch) view).isChecked();

		if (on) {
			// Enable vibrate
			Log.d(TAG, "switch enabled");
			//create a background process -- or a foreground process
			//create class listening to off_hook
			//read logs.. filter latest call. if picked -> vibrate
		} else {
			Log.d(TAG, "switch disabled");
			//terminate the background process
		}
	}
}
